<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<html>
<head>
	<title>添加耗材信息</title>
    <%@ include file="/WEB-INF/jsp/public/commons.jspf" %>
	<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/style/blue/forum.css" />
<%-- 	<script language="javascript" src="${pageContext.request.contextPath}/fckeditor/fckeditor.js" charset="utf-8"></script>
 --%>    
 	<script type="text/javascript">
		$(function(){
			var fck = new FCKeditor("content");
			fck.Width = "99%";
			fck.Height = "100%";
		//	fck.ToolbarSet = "admin";
			fck.BasePath = "${pageContext.request.contextPath}/fckeditor/";
			//fck.Config['SkinPath'] = "${pageContext.request.contextPath}/scriipt/fckeditoreditor/skins/office2003/";
			//fck.Config['SkinPath'] = "http://bbs.itcast.cn:80/widgets/fckeditor/editor/skins/office2003/";
			fck.ReplaceTextarea();
		});
    </script>
</head>
<body>

<!-- 标题显示 -->
<div id="Title_bar">
    <div id="Title_bar_Head">
        <div id="Title_Head"></div>
        <div id="Title"><!--页面标题-->
            <img border="0" width="13" height="13" src="${pageContext.request.contextPath}/style/images/title_arrow.gif"/> 耗材信息
        </div>
        <div id="Title_End"></div>
    </div>
</div>
    

<!--显示表单内容-->

<div id="MainArea">
	  <table cellspacing="0" cellpadding="0" class="TableStyle">
       
        <!-- 表头-->
        <thead>
            <tr align=center valign=middle id=TableTitle>
            	<td width="150px">物料编号</td>
				<td width="150px">物料名称</td> 
				<td width="200px">规格型号</td>
				<td>相关操作</td>
            </tr>
        </thead>

		<!--显示数据列表-->
		<s:iterator value="recordList" status="nowIndex">
        <tbody id="TableData" class="dataContainer" datakey="materialList">
			<tr class="TableDetail1 template">
				<td>${serialNumber}&nbsp;</td>
				<td>${name}&nbsp;</td>
				<td>${specification}&nbsp;</td>
     <%--         	<td><s:a action="materialConsume_add?serviceTopicId=%{serviceTopicId}&materialId=%{id}&num=%{num}">添加</s:a>
					&nbsp; 
				</td>   --%>
				<td><input type="text" name="nValue" id="${nowIndex.index+1}"/>
				<input type="button" value="添加"  onclick="saveValue(${nowIndex.index+1},${serviceTopicId},${id})"/>
				<%-- <a href="materialConsume_add.action?serviceTopicId=${serviceTopicId}&materialId=${id}&num=${7}">123</a> --%>
				</td>
<%-- 		<td><s:a action="materialConsume_add?serviceTopicId=${serviceTopicId}&materialId=${id}&num=">添加</s:a>
					&nbsp; 
					
				</td>  --%>

			</tr>
        </tbody>
        </s:iterator>
    </table>
<!--分页信息-->
		<%@ include file="/WEB-INF/jsp/public/pageView.jspf" %>

		<s:form action="materialConsume_addUI?serviceTopicId=%{serviceTopicId}&materialId=%{id}"></s:form> 
	<%-- <s:form action="materialConsume_add" cssStyle="margin: 0; padding: 0;">
		<s:hidden name="serviceTopicId"></s:hidden>
	
		<div id="PageHead"></div>
		<center>
			<div class="ItemBlock_Title1">
				<div width=85% style="float:left">
					<font class="MenuPoint"> &gt; </font>
					<s:a action="service_list">服务记录</s:a>
					<font class="MenuPoint"> &gt; </font>
					<s:a action="service_show?id=%{#serviceTopic.service.id}">${serviceTopic.service.name}</s:a>
					<font class="MenuPoint"> &gt;&gt; </font>
					耗材信息
				</div>
			</div>
			<div class="ItemBlockBorder">
				<table border="0" cellspacing="1" cellpadding="1" width="100%" id="InputArea">
					<tr>
						<td class="InputAreaBg" height="30" width="80px"><div class="InputTitle">记录标题</div></td>
						<td class="InputAreaBg"><div class="InputContent">${serviceTopic.title}</div></td>
					</tr>


				</table>
			</div>
		</center>
	</s:form> --%>

</div>




</body>
<script type="text/javascript">
		function saveValue(id,topicId,materialId){
			//no=document.getElementsByName('nValue')[id].Attr("value");
			var no=document.getElementById(id).value;
		 	window.location.href="materialConsume_add.action?serviceTopicId="+topicId+"&materialId="+materialId+"&num="+no;
		 	/*document.deliveryListForm.submit(); */
			//return no;
		};

</script>
</html>
